def calculate_bmi(height, weight):
    """计算BMI指数"""
    return weight / (height ** 2)

def determine_health_status(bmi):
    """根据BMI指数判断健康状况"""
    if bmi < 18.5:
        return "偏瘦"
    elif 18.5 <= bmi < 25:
        return "正常"
    elif 25 <= bmi < 30:
        return "偏胖"
    else:
        return "肥胖"

def main():
    while True:
        try:
            # 输入身高和体重
            height = float(input("请输入您的身高（单位：米）："))
            weight = float(input("请输入您的体重（单位：千克）："))

            # 计算BMI
            bmi = calculate_bmi(height, weight)

            # 判断健康状况
            health_status = determine_health_status(bmi)
            print(f"您的BMI值为：{bmi:.2f}，健康状况为：{health_status}")

            # 询问是否进行下一次测算
            another = input("是否进行下一次测算？(yes/no): ").lower()
            if another != "yes":
                break

        except ValueError:
            print("输入错误，请输入有效的数字。")

if __name__ == "__main__":
    main()